package com.langchain4j.core.flow.context.impl;

import com.langchain4j.core.flow.context.FlowLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 默认流程日志记录器实现
 */
@Slf4j
@Component
public class DefaultFlowLogger implements FlowLogger {
    
    @Override
    public void log(String executionId, String nodeId, String message) {
        log.info("[Flow] [{}] [{}] {}", executionId, nodeId, message);
    }
    
    @Override
    public void logError(String executionId, String nodeId, String message, Throwable error) {
        log.error("[Flow] [{}] [{}] {} - {}", executionId, nodeId, message, error.getMessage(), error);
    }
    
    @Override
    public void logWarning(String executionId, String nodeId, String message) {
        log.warn("[Flow] [{}] [{}] {}", executionId, nodeId, message);
    }
    
    @Override
    public void logDebug(String executionId, String nodeId, String message) {
        log.debug("[Flow] [{}] [{}] {}", executionId, nodeId, message);
    }
} 